﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Text;
namespace Things.Web.CropsPlantProgressInfo
{
    public partial class Show : Page
    {        
        		public string strid=""; 
		protected void Page_Load(object sender, EventArgs e)
		{
			if (!Page.IsPostBack)
			{
				if (Request.Params["id"] != null && Request.Params["id"].Trim() != "")
				{
					strid = Request.Params["id"];
					Guid CropsPlantProgressInfoID=new Guid(strid);
					ShowInfo(CropsPlantProgressInfoID);
				}
			}
		}
		
	private void ShowInfo(Guid CropsPlantProgressInfoID)
	{
		Things.BLL.CropsPlantProgressInfo bll=new Things.BLL.CropsPlantProgressInfo();
		Things.Model.CropsPlantProgressInfo model=bll.GetModel(CropsPlantProgressInfoID);
		this.lblCropsPlantProgressInfoID.Text=model.CropsPlantProgressInfoID.ToString();
		this.lblCropsID.Text=model.CropsID.ToString();

        Things.BLL.CropsPlantProgress ccpBLL = new BLL.CropsPlantProgress();
        Things.Model.CropsPlantProgress ccp = ccpBLL.GetModel(model.PlantProgressID);
        this.lblCropPlanProgress.Text = ccp != null ? ccp.PlantProgressName : string.Empty;
        this.lblPlantProgressID.Text = model.PlantProgressID.ToString();
        Session[Things.Common.ConstantString.Images] = model.Image;
        this.Image1.ImageUrl = "../DisplayImage.aspx";

        this.lblPhotoDatetime.Text = model.PhotoDatetime.Value.ToShortDateString();
        this.lblCreateDatetime.Text = model.CreateDatetime.Value.ToShortDateString();
		this.lblComments.Text=model.Comments;

	}


    }
}
